/*
 * @Date: 2024-11-18 15:10:07
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2024-11-18 15:10:09
 * @Description: 缓存管理相关接口
 */

import { defAxios as request } from '@/utils/http'

export function useCacheApi() {
    return {
        getCacheValue,
        clearCacheKey
    }
}

// 查询缓存内容
function getCacheValue(value) {
    return request({
        url: '/cache/getCacheDataByKey',
        method: 'GET',
        params: {
            code: value
        }
    })
}

// 清理缓存
function clearCacheKey(params) {
    return request({
        url: '/cache/deleteCacheDataByKey',
        method: 'post',
        data: params
    })
}

